<template>
  <div>
    数字:{{ number }}
  </div>
  <button @click="addNumber">加一</button>
  <button @click="delNumber">减一</button>
</template>


<script>
  export default{

    data(){
      return {
        number:1
      }
    },

    methods:{
      addNumber(){
        this.number++
      },
      delNumber(){
        this.number--
      }
    }
  }

</script>